<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta name="renderer" content="webkit"/>
  <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link href="<?php echo _APP_URL_;?>/favicon.ico" rel="icon">
  <title>管理平台</title>
  <link rel="stylesheet" href="<?php echo _APP_URL_;?>/library/layui/css/layui.css">
  <link rel="stylesheet" href="<?php echo _APP_URL_;?>/library/font-awesome/css/font-awesome.min.css">
  <link rel="stylesheet" href="<?php echo _APP_URL_;?>/system/platform/resource/admin.css">
  <script src="<?php echo _APP_URL_;?>/library/jquery/jquery-3.4.1.min.js"></script>

</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
  <div class="layui-header">
    <div class="layui-logo layui-hide-xs">PHPwork模块化工作台</div>
    <!-- 头部区域（可配合layui已有的水平导航） -->
    <ul class="layui-nav layui-layout-left">
      <!-- <li class="layui-nav-item"><a href="">控制台</a></li> -->
      <li class="layui-nav-item"><a title="侧边伸缩" id="phpwork_side"><i class="layui-icon layui-icon-shrink-right" style="color:#fff;cursor:pointer"></i></a></li>
      <li class="layui-nav-item"><a title="刷新" onclick="location.reload()"><i class="layui-icon layui-icon-refresh" style="color:#fff;cursor:pointer"></i></a></li>
      <li class="layui-nav-item"><a href="<?php echo url(['platform','platform','index']);?>"><i class="layui-icon layui-icon-home"></i> <cite>首页</cite></a></li>
      <li class="layui-nav-item">
        <a href="javascript:;"><i class="layui-icon layui-icon-component"></i> <cite>应用</cite></a>
        <dl class="layui-nav-child" style="max-height:600px;overflow-y: auto;">
		<?php
		$sql="select * from " . tablename('sys_module')  . "  order by id";
		$module_installed = $GLOBALS['db']->query($sql)->fetchall();
		foreach($module_installed as $row){
		?>
			<dd><a href="<?php echo  url([ $row['identifie'] ,'admin.index','index','index.php']);?>" target="_blank"><?php echo $row['name']; ?> &nbsp; <span style="color:#666">(<?php echo $row['identifie'] ; ?>)</span></a></dd>
		<?php
		}
		?>
        </dl>
      </li>
    </ul>
    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item">
        <a href="javascript:;">
          <img src="<?php echo _APP_URL_;?>/system/platform/resource/head.png" class="layui-nav-img" loading="lazy">
          管理员
        </a>
        <dl class="layui-nav-child">
          <dd><a href="<?php echo url(['platform','admin','password_form']);?>">修改密码</a></dd>
          <dd><a href="<?php echo url('platform/index/logout');?>">安全退出</a></dd>
        </dl>
      </li>
      <!-- <li class="layui-nav-item"><a href="">退出</a></li> -->
    </ul>
  </div>
  
  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      <ul class="layui-nav layui-nav-tree"  lay-filter="test" style="padding: 10px 0;">
        <li class="layui-nav-item">
          <a class="" href="<?php echo url(['platform','platform','index']);?>"><i class="layui-icon layui-icon-home" title="首页"></i>&emsp;<cite>首页</cite></a>
        </li>
        <li class="layui-nav-item">
          <a class="" href="<?php echo url(['platform','app','installed_list']);?>"><i class="layui-icon layui-icon-component" title="应用管理"></i>&emsp;<cite>应用管理</cite></a>
        </li>
        <li class="layui-nav-item">
          <a href="<?php echo url(['platform','config','app_default']);?>"><i class="layui-icon layui-icon-set" title="平台配置"></i>&emsp;<cite>平台配置</cite></a>
        </li>
        <li class="layui-nav-item"><a href="<?php echo url(['platform','admin','index']);?>"><i class="layui-icon layui-icon-user" title="用户管理"></i>&emsp;<cite>用户管理</cite></a></li>
        <li class="layui-nav-item"><a href="<?php echo url('platform/database/index');?>"><i class="layui-icon layui-icon-layer" title="数据库工具"></i>&emsp;<cite>数据库工具</cite></a></li>
        <li class="layui-nav-item">
          <a href="<?php echo url(['platform','wechat','wxweb']);?>"><i class="layui-icon layui-icon-set" title="微信公众号"></i>&emsp;<cite>微信公众平台</cite></a>
        </li>
        <li class="layui-nav-item"><a href="https://www.kancloud.cn/ruanjie/deep_phpwork/1368810" title="帮助手册" target="_blank"><i class="layui-icon layui-icon-read"></i>&emsp;<cite>帮助手册</cite></a></li>
      </ul>
    </div>
  </div>
  
  <div class="layui-body" style="background-color: #fafafa;">
    <!-- 内容主体区域 -->
    <div style="padding: 15px;">
